const state = {
  selectedIds: [],
  taskRunFresh: false, // 作业中心页的刷新 标识
  taskFilters: {
    session_id: '',
    session_name: ''
  },
  isFinish: false,
  
}

const mutations = {
  SET_SELECTED_IDS:(state,val) => {
    state.selectedIds = val
  },
  SET_TASK_RUN_FRESH:(state,val) => {
    state.taskRunFresh = val
  },
  SET_TASK_FILTERS:(state,val) => {
    state.taskFilters = val
  },
  SET_ISFINISH:(state,val) => {
    state.isFinish = val
  },

}

const actions = {
  setSelectedIds({commit},data){
    commit('SET_SELECTED_IDS', data)
  },
  setTaskRunFresh({commit},data){
    commit('SET_TASK_RUN_FRESH', data)
  },
  setTaskFilters({commit},data){
    commit('SET_TASK_FILTERS', data)
  },
  setIsFinish({commit},data){
    commit('SET_ISFINISH', data)
  },
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}